<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心-登陆</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="top_hw clearfix">
        <div class="top_h clearfix">
            <div class="top_hl"><span>欢迎来到中国梦想游，让你的梦想全程免费自由行！</span> 预定热线：<b>0571-63322269</b></div>
            <div class="top_hr"><a th:href="@{/register}">会员注册</a>  |  <a th:href="@{/goLogin}">登录</a>
        </div>
    </div>
    <div class="head_w">
        <div class="head_t clearfix">
            <div class="logo"><img src="images/logo.jpg"/></div>
            <div class="rx_line"><img src="images/rx.jpg"/></div>
        </div>
    </div>
    <div class="mainNav clearfix">
        <ul class="Nav_ul">
            <li  class="cur"><a th:href="@{/index}">首页</a><img src="images/nav_line.jpg"/></li>
            <li><a th:href="@{/travelRoute}">旅游路线</a><img src="images/nav_line.jpg"/></li>
            <li><a th:href="@{/travelSpot}">旅游景点</a><img src="images/nav_line.jpg"/></li>
            <li><a th:href="@{/hotelAccommodation}">餐饮住宿</a><img src="images/nav_line.jpg"/></li>
            <li ><a th:href="@{/car}">旅游车票</a><img src="images/nav_line.jpg"/></li>
            <li ><a th:href="@{/insurance}">旅游保险</a><img src="images/nav_line.jpg"/></li>
            <li ><a th:href="@{/strategy}">旅游攻略</a><img src="images/nav_line.jpg"/></li>
            <li><a th:href="@{/attention}">注意事项</a><img src="images/nav_line.jpg"/></li>
            <li th:if="${session.userName!=null}"><a th:href="@{/userCenter}">会员中心</a><img src="images/nav_line.jpg"/></li>
        </ul>
    </div>

    <div class="b_wrap">
        <div class="current"><span>当前所在地：</span><a th:href="@{/index}">首页</a>  >> <a th:href="@{/goLogin}">会员登录</a></div>
        <div class="login_w clearfix">
        <form class="layui-form" method="post" action="/userLoging">
            <div class="login">
                <div class="login_t">会员登录</div>
                <div class="login_con">
                    <table class="login_tab" width="270" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>用户名：</td>
                            <td><input type="text" id="userName" name="userName" value="" placeholder="请输入用户名"/></td>
                        </tr>
                        <tr>
                            <td>密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
                            <td><input type="password" id="password" name="password" value="" placeholder="请输入密码"/></td>
                        </tr>
                        <tr>
                            <td>验证码：</td>
                            <td>
                                <input  name="CODE" id="code" placeholder="验证码" type="text" class="">
                                <!-- 验证码 显示 -->
                                <!--这里改变验证码的方式有两种，一种是点击图片，另一种是点击后面的 超链接，看不清换一张-->
                                <img onclick="javascript:getvCode()" id="verifyimg" style="margin-left: 20px;"/>
                                <a href="#" onclick="getvCode()">看不清换一张</a>
                            </td>
                        </tr>
                        <tr>
                           <td></td>
                           <td th:text="${message}" ></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td><button class="log_b" type="submit">登 录</button></td>
                        </tr>
                    </table>
                </div>
                <div class="login_b">
                    <a th:href="@{/goLogin}">密码登录</a>&nbsp;|&nbsp;<a th:href="@{/goPhoneLogin}">短信登录</a>
                    <p>还不是梦想游会员？  <a class="free_zc" th:href="@{/register}">免费注册</a> </p>
                </div>
            </div>
        </form>
        </div>
    </div>
    <script type="text/javascript">
        getvCode();
        /**
         * 获取验证码
         * 将验证码写到index.html页面的id = verifyimg 的地方
         */
        function getvCode() {
            document.getElementById("verifyimg").src = timestamp("http://121.41.130.112:9999/verifyCode");
        }
        //为url添加时间戳
        function timestamp(url) {
            var getTimestamp = new Date().getTime();
            if (url.indexOf("?") > -1) {
                url = url + "&timestamp=" + getTimestamp
            } else {
                url = url + "?timestamp=" + getTimestamp
            }
            return url;
        };
    </script>
</body>
</html>
